#!/bin/bash
H=`date +%H`
M=`date +%M`
S=`date +%S`
((time_now=$H*3600+$M*60+$S))
((class_over=17*3600+30*60+00)) 
((timea=$time_now-$class_over)) 
((timeb=$class_over-$time_now)) 
if (( $time_now<$class_over ));then
        echo "距离下课有:`echo "$timeb/3600" |bc`小时$(( $timeb / 60 % 60)) 分钟 $(($timeb%60)) 秒放学"
elif (( $time_now==$class_over ));then
        echo "现在下课"
else
        echo " 已下课$(( $timea/3600 )) 小时 $(($timea/ 60 %60 )) 分钟$(($timeb%60))秒"
fi
